package com.manli.api.controller;

import java.util.Arrays;
import java.util.Map;

import com.manli.api.pojo.QueryParamsArea1;
import com.manli.api.pojo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import com.manli.api.base.annotation.Permissions;
import com.manli.api.pojo.QueryParams;
import com.manli.api.dto.AAreas;
import com.manli.api.service.AAreasService;



/**
 * 区域划分区级表
 *
 * @author manli
 * @email 
 * @date 2020-05-15 11:39:04
 */
@Api(value="/aareas", tags="区域划分区级表")
@RestController
@RequestMapping("api/aareas")
public class AAreasController {
    @Autowired
    private AAreasService aAreasService;

//    /**
//     * 列表
//     */
//    @ApiOperation(value = "区域划分区级表列表",notes = "")
//    @PostMapping("/list")
//    @Permissions(module = "", privilege = "", typeOfAccess = Permissions.METHOD_LOGIN)
//    public Result list(@RequestBody QueryParams params){
//        return aAreasService.queryPage(params);
//    }

    /**
     * 全部数据信息
     */
    @ApiOperation(value = "区域划分区级表全部数据信息",notes = "")
    @PostMapping("/all")
    @Permissions(module = "", privilege = "", typeOfAccess = Permissions.METHOD_LOGIN)
    public Result all(@RequestBody QueryParamsArea1 cityCode){
        return aAreasService.queryAll(cityCode);
    }

//    /**
//     * 单条信息
//     */
//    @ApiOperation(value = "区域划分区级表单条信息",notes = "区域划分区级表单条信息")
//    @GetMapping("/info/{code}")
//    @Permissions(module = "", privilege = "", typeOfAccess = Permissions.METHOD_LOGIN)
//    public Result info(@PathVariable("code") String code){
//        return aAreasService.getById(code);
//    }
//
//    /**
//     * 保存
//     */
//    @ApiOperation(value = "区域划分区级表保存",notes = "区域划分区级表保存")
//    @PostMapping("/save")
//    @Permissions(module = "", privilege = "", typeOfAccess = Permissions.METHOD_LOGIN)
//    public Result save(@RequestBody AAreas aAreas){
//        return aAreasService.save(aAreas);
//    }
//
//    /**
//     * 修改
//     */
//    @ApiOperation(value = "区域划分区级表修改",notes = "区域划分区级表修改")
//    @PostMapping("/update")
//    @Permissions(module = "", privilege = "", typeOfAccess = Permissions.METHOD_LOGIN)
//    public Result update(@RequestBody AAreas aAreas){
//        return aAreasService.updateById(aAreas);
//    }
//
//    /**
//     * 删除单条数据
//     */
//    @ApiOperation(value = "区域划分区级表删除",notes = "区域划分区级表删除")
//    @ApiImplicitParam(name = "codes", value = "id",dataType = "int", required = true)
//    @DeleteMapping("/delete")
//    @Permissions(module = "", privilege = "", typeOfAccess = Permissions.METHOD_LOGIN)
//    public Result delete(String code){
//        return aAreasService.removeById(code);
//    }
//
//    /**
//     * 删除多条数据
//     */
//    @ApiOperation(value = "区域划分区级表删除",notes = "区域划分区级表删除")
//    @ApiImplicitParam(name = "codes", value = "id数组,json字符串",dataType = "id数组,json字符串", required = true)
//    @DeleteMapping("/deleteIds")
//    @Permissions(module = "", privilege = "", typeOfAccess = Permissions.METHOD_LOGIN)
//    public Result deleteIds(@RequestBody String[] codes){
//        return aAreasService.removeByIds(Arrays.asList(codes));
//    }

}
